home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
mods
/
misc
/
CUST_Agony_MON.lha
/
Agony_MON
/
Agony1.s
< prev
next >
Wrap
Text File
|
1997-04-06
|
4KB
|
255 lines
*************************************************
* Agony In Game Music 1 by Jeroen Tel (1990). *
* Adapted by Mr.STYCKX / Nicolas Pomarède *
* *
* Original replay was in $6c3e. *
* *
* EaglePlayer / Delitracker port : 06/04/97 *
* Volume *
* Balance *
* SubSong *
* SongEnd *
* EP_Voices *
* EP_StructInit (Analyzer) *
* Uses Voices B, C, D *
* *
*************************************************
opt o+
output ram:CUST.Agony1_MON
AGO_TEST = 0 ; 0 => BUILD COMPLETE CUSTOM MODULE
; 1 => BUILD SMALL CODE FOR TESTING
section AGO,code_c
incdir "Include:" include "misc/DeliPlayer.i"
include "misc/EaglePlayer.i"
IFEQ AGO_TEST-0 ; COMPLETE VERSION
PLAYERHEADER PlayerTagArray
dc.b '$VER: Agony InGame Music #1 (1990) custom player V1.0, '
dc.b 'ripped and adapted by Mr.STYCKX (04/97)',0
EVEN
PlayerTagArray
dc.l DTP_CustomPlayer,1 ; CustomPlayer - Tag (important !!!)
dc.l DTP_Flags,PLYF_CUSTOM!PLYF_SONGEND
dc.l DTP_PlayerVersion,1<<16+0 ; v1.0
dc.l EP_PlayerVersion,1
dc.l DTP_PlayerName,PName
dc.l DTP_Creator,CName
dc.l DTP_InitPlayer,InitPlay ; alloc audio
dc.l DTP_EndPlayer,EndPlay ; free audio
dc.l DTP_InitSound,AGO_init ; init custom data
dc.l DTP_EndSound,AGO_end ; clear DMA
dc.l DTP_SubSongRange,AGO_SubSongRange
dc.l DTP_Interrupt,AGO_Play
dc.l DTP_Volume,AGO_Volume
dc.l DTP_Balance,AGO_Volume
dc.l EP_Voices,AGO_SetVoices
dc.l EP_StructInit,AGO_StructInit
dc.l EP_Flags,EPB_Voices!EPB_Analyzer!EPB_Volume!EPB_Balance!EPB_Songend
dc.l TAG_DONE
PName dc.b "Agony InGame #1 v1.0",0
CName dc.b "Music by Jeroen Tel / MON (1990).",$a
dc.b "Adapted by Mr.STYCKX (06/04/97)",0
EVEN
ELSEIF ; TESTVERSION
bra AGO_Debug
ENDC
;--------------- Constant depending on the module
ABS_START = $6c3e ; original start
INIT_ = ABS_START ; init rout
VBL_ = $6cc2 ; replay rout
DMAON_ = $6dda ; set DMA ON
DMAOFF_ = $6e6c ; set DMA OFF
PER_ = $6dae ; set Per
VOL_ = $6dbc ; set Vol
START_ = $6fb2 ; set Start
LEN_ = $6fbc ; set Len
RSTART_ = $6e02 ; set Repeat Start
RLEN_ = $6e12 ; set Repeat Len
RelocMus
tst.w RelocFlag
bne.s .done
lea MusicData(pc),a0
move.l a0,d0
sub.l #ABS_START,d0
add.l d0,$73a4-ABS_START(a0)
add.l d0,$73ac-ABS_START(a0)
add.l d0,$73b4-ABS_START(a0)
add.l d0,$73bc-ABS_START(a0)
add.l d0,$73c4-ABS_START(a0)
lea $73cc-ABS_START(a0),a1
lea $75cc-ABS_START(a0),a2
.loop add.l d0,(a1)+
cmp.l a2,a1
blt.s .loop
st RelocFlag
.done rts
RelocFlag dc.w 0
;------ Set DMA ON
SetON and.w AGO_DMA_EP(pc),d0
move.w d0,$96(a5)
rts
;------ Set DMA OFF
SetOFF move.w d1,$96(a5)
rts
;------ Set DMA Per
SetPer movem.l d7/a6,-(sp)
lsl.w #2,d7
lea AGO_StructA(pc),a6
move.l (a6,d7.w),a6
move.w d2,UPS_Voice1Per(a6)
move.w d2,$a6(a4)
movem.l (sp)+,d7/a6
rts
;------ Set DMA Vol
SetVol movem.l d7/a6,-(sp)
lsl.w #2,d7
lea AGO_StructA(pc),a6
move.l (a6,d7.w),a6
move.w d0,UPS_Voice1Vol(a6)
lea AGO_MasterVolA(pc),a6
lsr.w #1,d7 ; addresses words
mulu (a6,d7.w),d0
lsr.w #6,d0
move.w d0,$a8(a4)
movem.l (sp)+,d7/a6
rts
;------ Set DMA Start
SetStart
movem.l d7/a6,-(sp)
lsl.w #2,d7
lea AGO_StructA(pc),a6
move.l (a6,d7.w),a6
move.l d1,UPS_Voice1Adr(a6)
move.l d1,$a0(a4)
movem.l (sp)+,d7/a6
rts
;------ Set DMA Len
SetLen movem.l d7/a6,-(sp)
lsl.w #2,d7
lea AGO_StructA(pc),a6
move.l (a6,d7.w),a6
move.w d1,UPS_Voice1Len(a6)
move.w d1,$a4(a4)
movem.l (sp)+,d7/a6
rts
;------ Set DMA Repeat Start
SetRStart
movem.l d7/a6,-(sp)
lsl.w #2,d7
lea AGO_StructA(pc),a6
move.l (a6,d7.w),a6
;; move.l d1,UPS_Voice1Adr(a6)
move.l d1,$a0(a4)
movem.l (sp)+,d7/a6
rts
;------ Set DMA Repeat Len
SetRLen movem.l d7/a6,-(sp)
lsl.w #2,d7
lea AGO_StructA(pc),a6
move.l (a6,d7.w),a6
;; move.w d1,UPS_Voice1Len(a6)
move.w d1,$a4(a4)
movem.l (sp)+,d7/a6
rts
;---------------------------------------------------------------
; Common part for custom module
include b:Agony_MON/AgonyCommon.s
;---------------------------------------------------------------
; Replay + music data
dc.l 'MONS','TART'
MusicData
incbin b:Agony_MON/Agony1.bin
;---------------------------------------------------------------
; END